package com.weitu.archives.ledger.controller;

import com.weitu.base.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by smp on 2017/5/15.
 */
@Controller
@RequestMapping(value = "archives/ledger")
public class LedgerController extends BaseController {
    private static final String MODULE_BATH_PATH=BASE_JSP_PATH+"archives/ledger";

    /**
     * 我的观察卡
     * @return
     */
    @RequestMapping(value = "/myObservation",method = RequestMethod.GET)
    public ModelAndView myObservation(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("myArchivesId",BaseController.getSessionUser().getId());
        modelAndView.addObject("myArchivesName",BaseController.getSessionUser().getRealName());
        modelAndView.setViewName(MODULE_BATH_PATH+"/myObservation");
        return modelAndView;
    }

    /**
     * 我的安全检查
     * @return
     */
    @RequestMapping(value = "/mySecurityCheck",method = RequestMethod.GET)
    public ModelAndView mySecurityCheck(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("mySecurityCheckId",BaseController.getSessionUser().getId());
        modelAndView.addObject("mySecurityCheckName",BaseController.getSessionUser().getRealName());
        modelAndView.setViewName(MODULE_BATH_PATH+"/mySecurityCheck");
        return modelAndView;
    }

    /**
     * 我的事故事件
     * @return
     */
    @RequestMapping(value = "/myAccident",method = RequestMethod.GET)
    public ModelAndView myAccident(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("myAccidentId",BaseController.getSessionUser().getId());
        modelAndView.addObject("myAccidentName",BaseController.getSessionUser().getRealName());
        modelAndView.setViewName(MODULE_BATH_PATH+"/myAccident");
        return modelAndView;
    }
}
